import { PORT4 } from "@/api/config/servicePort";
import http from "@/api";

// 新增股票买入卖出记录
export const transactionsAddTransactions = params => http.post(PORT4 + `/transactions/addTransactions`, params);

// 批量新增股票买入卖出记录
export const transactionsAddTransactionsList = params => http.post(PORT4 + `/transactions/addBatch`, params);

// 根据用户id查询交易记录
export const transactionsFindTransactionsByUserId = params => http.post(PORT4 + `/transactions/findTransactionsByUserId`, params);

// 查询所有用户
export const userFindAllUser = () => http.get(PORT4 + `/user/findAllUser`);

// ============================用户持仓====================================

// 查询用户持仓情况
export const positionsFindPositionsByUserId = params => http.get(PORT4 + `/positions/findPositionsByUserId`, params);

// 根据持仓列表查询持仓每天的明细
export const positionsFindPositionsByList = params => http.post(PORT4 + `/positions/findPositionsDetail`, params);

// ============================日志====================================
// 日志登记
export const stockAddDayLog = params => http.post(PORT4 + `/dayLog/addDayLog`, params);
// 查询日志
export const dayLogFindDayLog = params => http.post(PORT4 + `/dayLog/findDayLog`, params);
// 删除日志
export const dayLogDeleteDayLog = params => http.get(PORT4 + `/dayLog/deleteDayLog`, params);

// ============================转账记录====================================
// 转账记录新增
export const userTransferAccountsAdd = params => http.post(PORT4 + `/userTransferAccounts/add`, params);

//  查询每天用户金额变动记录历史
export const userFindUserDayHistory = params => http.post(PORT4 + `/user/findUserDayHistory`, params);

// ============================工作日====================================
// 批量新增工作日
export const workdayAddWorkday = params => http.post(PORT4 + `/workday/addWorkday`, params);

// 查询范围内工作日
export const workdayFindWorkDayByScope = params => http.get(PORT4 + `/workday/findWorkDayByScope`, params);

// =================================================
// 查询范围内工作日
export const homeFindNewChart = params => http.post(PORT4 + `/home/findNewChart`, params);
